package com.centaline.androidsalesblog.api.usercenter;

import com.android.volley.Request;
import com.centaline.androidsalesblog.api.UserCenterApi;
import com.centaline.androidsalesblog.constants.AppConstant;
import com.centaline.androidsalesblog.constants.AppNameType;
import com.centaline.androidsalesblog.constants.SourceType;
import com.centaline.androidsalesblog.model.responseobject.InsertBookRo;
import com.centanet.framework.interfaces.IResponseListener;

/**
 * 新增报名
 * Created by guilin on 16/4/15.
 */
public class InsertBookApi extends UserCenterApi<InsertBookRo> {

    private String actId;
    private String estId;
    private String estExtId;
    private String customerName;
    private String customerMobile;

    public InsertBookApi(Class<?> tag, Class<InsertBookRo> aClass, IResponseListener<InsertBookRo> iResponseListener) {
        super(tag, aClass, iResponseListener);
    }

    public void setActId(String actId) {
        this.actId = actId;
    }

    public void setEstId(String estId) {
        this.estId = estId;
    }

    public void setEstExtId(String estExtId) {
        this.estExtId = estExtId;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public void setCustomerMobile(String customerMobile) {
        this.customerMobile = customerMobile;
    }

    @Override
    protected int getMethod() {
        return Request.Method.POST;
    }

    @Override
    protected void setParams() {
        putStringParams("ActId", actId);
        putStringParams("EstId", estId);
        putStringParams("EstExtId", estExtId);
        putStringParams("UserId", AppConstant.UserId);
        putStringParams("CustomerName", customerName);
        putStringParams("CustomerMobile", customerMobile);
        putStringParams("CustomerSex", "先生");
        putStringParams("CityCode", AppConstant.CityCode);
        putParams("Source", SourceType.HUODONG.getSource());
        putParams("AppName", AppNameType.NEWPROP.getAppName());
    }

    @Override
    protected String getPath() {
        return "InsertUserBookingRequest";
    }
}
